//
//  WCTableView.m
//  WC
//
//  Created by wsj2015 on 16/1/20.
//  Copyright © 2016年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCTableView.h"

@interface WCTableView ()



@end

@implementation WCTableView

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self configWithUi];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)configWithUi{
    
    self.tableView =[[WSJTalbeView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight- 64) style:UITableViewStylePlain];
    self.tableView.delegate =self;
    self.tableView.dataSource=self;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
   
    [self.view addSubview:self.tableView];
    self.view.backgroundColor = [UIColor whiteColor];
    self.tableView.backgroundColor = kAppBg;


}

- (void)setTapGblock:(void (^)())tapGblock
{
    _tapGblock = tapGblock;
    
    UITapGestureRecognizer *tap =[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
    //解决cell 的点击事件 被截获
    tap.cancelsTouchesInView = NO;
    [self.tableView addGestureRecognizer:tap];
}
- (void)tapAction:(UITapGestureRecognizer *)tap{
    if (self.tapGblock) {
        self.tapGblock();
    }

}
@end
